//
//  InlandTableViewCell.m
//  Funny
//
//  Created by dllo on 15/10/28.
//  Copyright © 2015年 King. All rights reserved.
//

#import "InlandTableViewCell.h"

@implementation InlandTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.cityImgView = [[UIImageView alloc]init];
        [self.contentView addSubview:self.cityImgView];
        //UIView设置圆角
        self.cityImgView.layer.masksToBounds = YES;
        self.cityImgView.layer.cornerRadius = 10;
        
        self.cnname = [[UILabel alloc]init];
        self.cnname.textAlignment = NSTextAlignmentCenter;
        self.cnname.textColor = [UIColor whiteColor];
        self.cnname.font = [UIFont systemFontOfSize:28 weight:0.5 ];
        [self.contentView addSubview:self.cnname];
        
        self.enname = [[UILabel alloc]init];
        self.enname.textAlignment = NSTextAlignmentCenter;
        self.enname.textColor = [UIColor whiteColor];
        self.enname.font = [UIFont systemFontOfSize:22];
        [self.contentView addSubview:self.enname];
        
        self.footView = [[UIImageView alloc]init];
        [self.contentView addSubview:self.footView];
        self.footView.layer.masksToBounds = YES;
        self.footView.layer.cornerRadius = 10;
        
        self.cityname = [[UILabel alloc]init];
        [self.contentView addSubview:self.cityname];
        self.cityname.textAlignment = NSTextAlignmentLeft;
        self.cityname.textColor = [UIColor whiteColor];
        self.cityname.font = [UIFont systemFontOfSize:16];
        
        self.beentoLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.beentoLabel];
        self.beentoLabel.textAlignment = NSTextAlignmentRight;
        self.beentoLabel.textColor = [UIColor whiteColor];
        self.beentoLabel.font = [UIFont systemFontOfSize:14];
        
        self.scenicLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.scenicLabel];
        self.scenicLabel.textAlignment = NSTextAlignmentLeft;
        self.scenicLabel.textColor = [UIColor whiteColor];
        self.scenicLabel.font = [UIFont systemFontOfSize:12];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.cityImgView.frame = CGRectMake(10*W, 5*H, self.contentView.frame.size.width - 20*W, 200*H);
    self.cnname.frame = CGRectMake(0, 50*H, self.contentView.bounds.size.width, 30*H);
    self.enname.frame = CGRectMake(0, 90*H, self.contentView.bounds.size.width, 30*H);
    self.footView.frame = CGRectMake(10*W, 145*H, self.contentView.bounds.size.width - 20*W, 60*H);
    self.cityname.frame = CGRectMake(25*W, 160*H, 125*W, 20*H);
    self.beentoLabel.frame = CGRectMake(150*W, 160*H, 200*W, 20*H);
    self.scenicLabel.frame = CGRectMake(25*W, 180*H, 325*W, 20*H);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
